package com.example.jdktest.test;

import com.alibaba.fastjson.JSON;
import com.example.jdktest.model.User;
import com.example.jdktest.model.Users;

import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @author dangwen1
 * @date 2022年02月18日 10:05
 * @description
 */
public class ListTest2 {
    public static void main(String[] args) {
//        ListTest listTest = new ListTest();
//        Users users = listTest.getUsers();
//        System.out.println(users.getGoodUsers().size());
//        List<User> list = new LinkedList();
//        list.add(new User("dangwen1","1"));
//        list.add(new User("dangwen2","1"));
//        list.add(new User("dangwen3","1"));
//        Users users = new Users();
//        users.getGoodUsers().addAll(list);
//        System.out.println(users.getGoodUsers().size());

        List<String> list1 = Arrays.asList("en_US","zh_TW","th_TH","es_ES","es_419","fr_FR","ru_RU","vi_VN","de_DE","id_ID","tr_TR","pt_BR","pt_PT","it_IT","pl_PL","ro_RO","cs_CZ","uk_UA");
        List<String> list2 = Arrays.asList("ru_RU","zh_CN","es_419","es_ES","de_DE","fr_FR","pt_PT","pt_BR","it_IT","ro_RO","en_US","pl_PL","cs_CZ","id_ID","th_TH","tr_TR","uk_UA","vi_VN");
        List<String> collect = list1.stream().filter(x -> !list2.contains(x)).collect(Collectors.toList());
        System.out.println(JSON.toJSONString(collect));
    }
}
